#!/bin/bash

# 检查/etc/issue是否存在
if [ ! -f "/etc/issue" ]; then
    echo "[FAIL] /etc/issue 文件不存在"
    exit 1
fi

# 检查权限是否正确
if [[ "$(stat -c %U:%G /etc/issue)" == "root:root" && "$(stat -c %a /etc/issue)" == "644" ]]; then
    echo "[PASS] /etc/issue权限配置正确"
else
    echo "[FAIL] /etc/issue权限配置不正确"
    exit 1
fi

